<template>
    <div class="gallary" @click="closeGallary">
        <swiper :options="swiperOption" class="wapper">
            <swiper-slide v-for="(item, index) in imges" :key="index">
                <img class="gallary-img"  :src="item" alt="">
            </swiper-slide>
            <div class="swiper-pagination"  slot="pagination"></div>
        </swiper>
    </div>
</template>

<script>
/* eslint-disable */
export default {
    name: 'gallary',
    props: {
        imges: Array
    },
    data() {
        return {
            swiperOption: {
                pagination: ".swiper-pagination",
                paginationType: 'fraction',
                observeParents: true,
                observer: true
            }
        }
    },
    methods: {
        closeGallary() {
            this.$emit('close')
        }
    }
}
</script>

<style lang="stylus" scoped>
    .gallary >>> .swiper-pagination-fraction
        padding-bottom -1rem
    .gallary
        display flex
        flex-direction: column;
        justify-content center
        position fixed
        top 0
        left 0
        bottom 0
        right 0
        background #000
        z-index 9999
        .wapper
            width 100%
            height 0
            padding-bottom 100%
            .gallary-img
                width 100%
            .swiper-pagination-fraction
                color #ffffff
            
</style>

